package org.leviatan.definator.gui.swingmodels;

import javax.swing.tree.DefaultMutableTreeNode;

import org.leviatan.definator.core.model.Field;

public class FieldTreeNodeModel extends DefaultMutableTreeNode {

	private static final long serialVersionUID = -7047410204750923564L;

	private String id;
	
	private int length;
	private String name;
	private String recRef;
	private String type;
	
	
	public FieldTreeNodeModel(Field fldModel) {
		super();
		this.id = fldModel.getId();
		this.length = fldModel.getLength();
		this.name = fldModel.getName();
		this.recRef = fldModel.getRecordRef();
		this.type = fldModel.getType();
		this.setUserObject(this);
	}


	public String getId() {
		return this.id;
	}


	public void setId(String id) {
		this.id = id;
	}

	public int getLength() {
		return this.length;
	}


	public void setLength(int length) {
		this.length = length;
	}


	public String getName() {
		return this.name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getRecRef() {
		return this.recRef;
	}


	public void setRecRef(String recRef) {
		this.recRef = recRef;
	}


	public String getType() {
		return this.type;
	}


	public void setType(String type) {
		this.type = type;
	}
	
	public String toString() {
		return "[fld] "+this.name;
	}

	

	

	

}
